import request from '@/utils/request';

export function userList(data) {
  return request({
    url:'/sys/imUser/userList',
    method: 'get',
    params:data
  })
}

export function updateActiveStatus(id, params) {
  return request({
    url: '/sys/imUser/updateActiveStatus/' + id,
    method: 'post',
    params: params
  })
}

/*获取所有用户权限*/
export function getAllPowerList() {
  return request({
    url: '/sys/imUser/getAllPowerList',
    method: 'get'
  })
}
/*获取用户的权限*/
export function getHavePowerList(userId) {
  return request({
    url: '/sys/imUser/getHavePowerList/' + userId,
    method: 'get'
  })
}

/*给用户权限*/
export function updateUserPower(data) {
  return request({
    url: '/sys/imUser/power/update',
    method: 'post',
    data: data
  })
}


export function getUserCount(data) {
  return request({
    url:'/sys/imUser/getUserCount',
    method:'post',
    data:data
  })
}
export function updateShowStatus(data) {
  return request({
    url:'/brand/update/showStatus',
    method:'post',
    data:data
  })
}

export function updateFactoryStatus(data) {
  return request({
    url:'/brand/update/factoryStatus',
    method:'post',
    data:data
  })
}

export function deleteBrand(id) {
  return request({
    url:'/brand/delete/'+id,
    method:'get',
  })
}

export function getBrand(id) {
  return request({
    url:'/brand/'+id,
    method:'get',
  })
}

export function updateBrand(id,data) {
  return request({
    url:'/brand/update/'+id,
    method:'post',
    data:data
  })
}

